package com.yztc.orangeentertainment.ui.main.subscribefragment;

import android.content.Context;
import android.util.Log;

import com.yztc.orangeentertainment.adapter.SubInterestAdapter;
import com.yztc.orangeentertainment.bean.subscribebean.ListBean;
import com.yztc.orangeentertainment.config.SubscribeUrlConfig;

import java.util.List;
import java.util.Map;

/**
 * Created by My on 2016/10/5.
 * subPresent类
 */
public class SubPresenter implements SubContract.Presenter{
    private SubContract.View view;
    private SubModle modle;

    public SubPresenter(SubContract.View view) {
        this.view = view;
        this.modle=new SubModle();
    }

    @Override
    public void getInterestFromNet(Map<String, String> params, final Context context) {
        modle.getInterestAll( SubscribeUrlConfig.PATH.URL_TYPE, params,
                new OnLoadBottomListener() {
                    @Override
                    public void onSuccess(List<ListBean> list) {
                        view.onLoadInterestSuccess(list);
                    }

                    @Override
                    public void onFailure(Exception e) {

                    }
                },context);
    }

    @Override
    public void getInterestFromDb() {

    }
}
